<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script type="text/javascript" src="__STATIC__/new_file.js">
		</script>
		
		<script type="text/javascript">
			
			$(function(){
				console.log(13);
				$("button#but").click(function(){
					$.ajax({
						url:"{:url('index/Hello/api')}",
						type:"get",
						xhrFields: {
						        withCredentials: true // 携带跨域cookie
						    },
						success:function(data,suc){
							console.log(data.data);
						}
					})
				})
			})
			window.onload=function(){
				var cookie=document.cookie;
				var sess=document.session;
				console.log(cookie.length)
				var arr=cookie.split(";");
				console.log(arr[0])
				var d=arr[0].split("=");
				console.log(d)
				var a=d[0];
				var b=d[1];
				var q=[{key:a,value:b}]
				console.log(q);
				var f=document.form.file;
				f.onchange=function(e){
					console.log(e);
				}
			}
			
		</script>
	</head>
	<body>
		<form  name="form" action="" method="" enctype="multipart/form-data">
			<input type="file"  name="file" id="" value="" />
		</form>
		<div style="width: 200px;height: 200px;">
			<div>
				如果你想检验登陆状态，cookie应该由服务端设定
				如果你想用cookie暂存某些数据，这些数据则实际上不必发送
				如果你想发送数据，可以在query、body中携带
				如果你想在客户端主动操作授权，可以使用authorization
			</div>
		</div>
		
		<button type="button" id="but">点击</button>
		
		<div id="app">
			{{msg}}
		</div>
		<script type="text/javascript" src="__STATIC__/js/vue.min.js">
		<script type="text/javascript">
			new Vue({
				el:"#app",
				data:{
					msg:"hello"
				},
				template:"<div>{{msg}}</div>"
			})
		</script>
	</body>
</html>
